<html>
<head><meta charset="utf-8"><title>generator witness erasure #83737 · wg-traits · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/index.html">wg-traits</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737.html">generator witness erasure #83737</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="236399909"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/generator%20witness%20erasure%20%2383737/near/236399909" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737.html#236399909">(Apr 27 2021 at 20:06)</a>:</h4>
<p>Okay, so we should definitely talk about <a href="https://github.com/rust-lang/rust/issues/83737">#83737</a></p>



<a name="236399999"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/generator%20witness%20erasure%20%2383737/near/236399999" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737.html#236399999">(Apr 27 2021 at 20:07)</a>:</h4>
<p>(perf literally just came in for <a href="https://github.com/rust-lang/rust/issues/82272">#82272</a>; slight regression in everything, but less than 1%. I'll take that)</p>



<a name="236400098"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/generator%20witness%20erasure%20%2383737/near/236400098" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737.html#236400098">(Apr 27 2021 at 20:08)</a>:</h4>
<p>So, for <a href="https://github.com/rust-lang/rust/issues/83737">#83737</a>, how do you want to approach this? How much do you remember?</p>



<a name="236400145"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/generator%20witness%20erasure%20%2383737/near/236400145" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737.html#236400145">(Apr 27 2021 at 20:08)</a>:</h4>
<p>about the symbol name stuff?</p>



<a name="236400152"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/generator%20witness%20erasure%20%2383737/near/236400152" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737.html#236400152">(Apr 27 2021 at 20:08)</a>:</h4>
<p>a fair amount I guess</p>



<a name="236400196"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/generator%20witness%20erasure%20%2383737/near/236400196" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737.html#236400196">(Apr 27 2021 at 20:09)</a>:</h4>
<p>Nope, this one isn't symbol name</p>



<a name="236400202"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/generator%20witness%20erasure%20%2383737/near/236400202" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737.html#236400202">(Apr 27 2021 at 20:09)</a>:</h4>
<p>This is the generator witness one</p>



<a name="236400223"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/generator%20witness%20erasure%20%2383737/near/236400223" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737.html#236400223">(Apr 27 2021 at 20:09)</a>:</h4>
<p><em>ah</em></p>



<a name="236400230"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/generator%20witness%20erasure%20%2383737/near/236400230" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737.html#236400230">(Apr 27 2021 at 20:09)</a>:</h4>
<p>I.e. this MCVE:</p>
<div class="codehilite" data-code-language="Rust"><pre><span></span><code><span class="k">use</span><span class="w"> </span><span class="n">core</span>::<span class="n">future</span>::<span class="n">Future</span><span class="p">;</span><span class="w"></span>

<span class="k">async</span><span class="w"> </span><span class="k">fn</span> <span class="nf">handle</span><span class="o">&lt;</span><span class="n">F</span><span class="o">&gt;</span><span class="p">(</span><span class="n">slf</span>: <span class="kp">&amp;</span><span class="nc">F</span><span class="p">)</span><span class="w"></span>
<span class="k">where</span><span class="w"></span>
<span class="w">    </span><span class="n">F</span>: <span class="nb">Fn</span><span class="p">(</span><span class="o">&amp;</span><span class="p">())</span><span class="w"> </span>-&gt; <span class="kp">&amp;</span><span class="nc">mut</span><span class="w"> </span><span class="p">(</span><span class="k">dyn</span><span class="w"> </span><span class="k">for</span><span class="o">&lt;'</span><span class="na">a</span><span class="o">&gt;</span><span class="w"> </span><span class="n">Future</span><span class="o">&lt;</span><span class="n">Output</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">()</span><span class="o">&gt;</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="nb">Unpin</span><span class="p">),</span><span class="w"></span>
<span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="p">(</span><span class="n">slf</span><span class="p">)(</span><span class="o">&amp;</span><span class="p">()).</span><span class="k">await</span><span class="p">;</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</code></pre></div>



<a name="236400243"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/generator%20witness%20erasure%20%2383737/near/236400243" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737.html#236400243">(Apr 27 2021 at 20:09)</a>:</h4>
<p>ok, we've been putting off talking about that for a while</p>



<a name="236400257"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/generator%20witness%20erasure%20%2383737/near/236400257" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737.html#236400257">(Apr 27 2021 at 20:09)</a>:</h4>
<p>yes</p>



<a name="236400262"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/generator%20witness%20erasure%20%2383737/near/236400262" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737.html#236400262">(Apr 27 2021 at 20:09)</a>:</h4>
<p>Sort of</p>



<a name="236400264"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/generator%20witness%20erasure%20%2383737/near/236400264" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737.html#236400264">(Apr 27 2021 at 20:09)</a>:</h4>
<p>let me run that locally</p>



<a name="236400409"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/generator%20witness%20erasure%20%2383737/near/236400409" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737.html#236400409">(Apr 27 2021 at 20:10)</a>:</h4>
<p>The problem is: I have no clue where the <code>local_decl</code> <code>&amp;mut (dyn for&lt;'a&gt; Future&lt;Output = ()&gt; + Unpin)</code> gets added to <code>Body</code></p>



<a name="236400456"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/generator%20witness%20erasure%20%2383737/near/236400456" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737.html#236400456">(Apr 27 2021 at 20:11)</a>:</h4>
<p>Actually, I keep doing this, but I use <code>Box&lt;dyn for&lt;'a&gt; Future&lt;Output = ()&gt; + Unpin&gt;</code> instead, so we don't have the lifetime on <code>&amp;mut</code> to think about</p>



<a name="236400660"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/generator%20witness%20erasure%20%2383737/near/236400660" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737.html#236400660">(Apr 27 2021 at 20:12)</a>:</h4>
<p>ok so</p>



<a name="236400674"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/generator%20witness%20erasure%20%2383737/near/236400674" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737.html#236400674">(Apr 27 2021 at 20:12)</a>:</h4>
<p>i'm not reproducing any problem with that MCVE</p>



<a name="236400681"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/generator%20witness%20erasure%20%2383737/near/236400681" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737.html#236400681">(Apr 27 2021 at 20:12)</a>:</h4>
<p>perhaps my build is too old or something</p>



<a name="236400699"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/generator%20witness%20erasure%20%2383737/near/236400699" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737.html#236400699">(Apr 27 2021 at 20:12)</a>:</h4>
<p>Make sure it's an rlib</p>



<a name="236400704"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/generator%20witness%20erasure%20%2383737/near/236400704" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737.html#236400704">(Apr 27 2021 at 20:13)</a>:</h4>
<p>heh</p>



<a name="236400707"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/generator%20witness%20erasure%20%2383737/near/236400707" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737.html#236400707">(Apr 27 2021 at 20:13)</a>:</h4>
<p>right</p>



<a name="236400721"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/generator%20witness%20erasure%20%2383737/near/236400721" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737.html#236400721">(Apr 27 2021 at 20:13)</a>:</h4>
<p>k</p>



<a name="236400731"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/generator%20witness%20erasure%20%2383737/near/236400731" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737.html#236400731">(Apr 27 2021 at 20:13)</a>:</h4>
<p>I remember this from before :)</p>



<a name="236400798"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/generator%20witness%20erasure%20%2383737/near/236400798" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737.html#236400798">(Apr 27 2021 at 20:13)</a>:</h4>
<div class="codehilite" data-code-language="Rust"><pre><span></span><code><span class="c1">// build-pass</span>
<span class="c1">// compile-flags: --edition 2018</span>
<span class="c1">// compile-flags: --crate-type rlib</span>

<span class="k">use</span><span class="w"> </span><span class="n">std</span>::<span class="n">future</span>::<span class="n">Future</span><span class="p">;</span><span class="w"></span>

<span class="k">async</span><span class="w"> </span><span class="k">fn</span> <span class="nf">handle</span><span class="o">&lt;</span><span class="n">F</span><span class="o">&gt;</span><span class="p">(</span><span class="n">slf</span>: <span class="kp">&amp;</span><span class="nc">F</span><span class="p">)</span><span class="w"></span>
<span class="k">where</span><span class="w"></span>
<span class="w">    </span><span class="n">F</span>: <span class="nb">Fn</span><span class="p">(</span><span class="o">&amp;</span><span class="p">())</span><span class="w"> </span>-&gt; <span class="nb">Box</span><span class="o">&lt;</span><span class="k">dyn</span><span class="w"> </span><span class="n">Future</span><span class="o">&lt;</span><span class="n">Output</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">()</span><span class="o">&gt;</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="nb">Unpin</span><span class="o">&gt;</span><span class="p">,</span><span class="w"></span>
<span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="p">(</span><span class="n">slf</span><span class="p">)(</span><span class="o">&amp;</span><span class="p">()).</span><span class="k">await</span><span class="p">;</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>

<span class="k">fn</span> <span class="nf">main</span><span class="p">()</span><span class="w"> </span><span class="p">{}</span><span class="w"></span>
</code></pre></div>



<a name="236400820"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/generator%20witness%20erasure%20%2383737/near/236400820" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737.html#236400820">(Apr 27 2021 at 20:14)</a>:</h4>
<p>Except with the <code>for&lt;'a&gt;</code></p>



<a name="236400994"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/generator%20witness%20erasure%20%2383737/near/236400994" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737.html#236400994">(Apr 27 2021 at 20:15)</a>:</h4>
<p>It's been a sec since I've gone through to try to debug this, but I basically tried to find every place a <code>Body</code> was either created or <code>local_decls</code> was <code>push</code>ed or <code>extend</code>ed and <code>dbg</code>ed them to try to find where that particular local got added</p>



<a name="236401007"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/generator%20witness%20erasure%20%2383737/near/236401007" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737.html#236401007">(Apr 27 2021 at 20:15)</a>:</h4>
<p>And came up with literally nothing</p>



<a name="236401036"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/generator%20witness%20erasure%20%2383737/near/236401036" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737.html#236401036">(Apr 27 2021 at 20:15)</a>:</h4>
<p>So I missed something somewhere and got stuck</p>



<a name="236401116"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/generator%20witness%20erasure%20%2383737/near/236401116" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737.html#236401116">(Apr 27 2021 at 20:16)</a>:</h4>
<p>ok</p>



<a name="236401141"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/generator%20witness%20erasure%20%2383737/near/236401141" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737.html#236401141">(Apr 27 2021 at 20:16)</a>:</h4>
<p>I'm running with some debuginfo to try and populate my cache</p>



<a name="236401177"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/generator%20witness%20erasure%20%2383737/near/236401177" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737.html#236401177">(Apr 27 2021 at 20:16)</a>:</h4>
<p>Really, the best solution is to not have any bound vars in the local declaration that goes into the <code>Body</code>, since lifetimes should be erased at that point</p>



<a name="236401385"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/generator%20witness%20erasure%20%2383737/near/236401385" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737.html#236401385">(Apr 27 2021 at 20:18)</a>:</h4>
<p>hmm</p>



<a name="236401418"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/generator%20witness%20erasure%20%2383737/near/236401418" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737.html#236401418">(Apr 27 2021 at 20:18)</a>:</h4>
<p>thread 'rustc' panicked at 'found unstable fingerprints for evaluate_obligation(cc9f2525495a3a8a-e5fadaab4a16a58c): Ok(EvaluatedToOk)', /rustc/215738137bcbef2c3637a5bd290ef612cffe6ba5/compiler/rustc_query_system/src/query/plumbing.rs:593:5</p>



<a name="236401421"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/generator%20witness%20erasure%20%2383737/near/236401421" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737.html#236401421">(Apr 27 2021 at 20:18)</a>:</h4>
<p>fun</p>



<a name="236401439"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/generator%20witness%20erasure%20%2383737/near/236401439" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737.html#236401439">(Apr 27 2021 at 20:18)</a>:</h4>
<p>I guess I should work with <span class="user-mention" data-user-id="125294">@Aaron Hill</span> to fix that bug ;)</p>



<a name="236401481"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/generator%20witness%20erasure%20%2383737/near/236401481" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737.html#236401481">(Apr 27 2021 at 20:19)</a>:</h4>
<p>That's popped up a bunch for me</p>



<a name="236401497"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/generator%20witness%20erasure%20%2383737/near/236401497" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737.html#236401497">(Apr 27 2021 at 20:19)</a>:</h4>
<p>Not just for <code>evaluate_obligations</code></p>



<a name="236401521"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/generator%20witness%20erasure%20%2383737/near/236401521" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737.html#236401521">(Apr 27 2021 at 20:19)</a>:</h4>
<p>Each different query in that error is a separate bug</p>



<a name="236401538"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/generator%20witness%20erasure%20%2383737/near/236401538" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737.html#236401538">(Apr 27 2021 at 20:19)</a>:</h4>
<p>The <code>predicate_of</code> bug is being worked on</p>



<a name="236402039"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/generator%20witness%20erasure%20%2383737/near/236402039" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737.html#236402039">(Apr 27 2021 at 20:23)</a>:</h4>
<p>extra fun</p>



<a name="236402706"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/generator%20witness%20erasure%20%2383737/near/236402706" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737.html#236402706">(Apr 27 2021 at 20:28)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> any luck?</p>



<a name="236402847"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/generator%20witness%20erasure%20%2383737/near/236402847" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737.html#236402847">(Apr 27 2021 at 20:29)</a>:</h4>
<p>not yet</p>



<a name="236402887"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/generator%20witness%20erasure%20%2383737/near/236402887" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737.html#236402887">(Apr 27 2021 at 20:30)</a>:</h4>
<p>this unstable fingerprints bug is pretty frustrating</p>



<a name="236402933"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/generator%20witness%20erasure%20%2383737/near/236402933" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737.html#236402933">(Apr 27 2021 at 20:30)</a>:</h4>
<p>I just <code>./x.py clean</code> and redo</p>



<a name="236402937"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/generator%20witness%20erasure%20%2383737/near/236402937" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737.html#236402937">(Apr 27 2021 at 20:30)</a>:</h4>
<p>yes</p>



<a name="236402940"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/generator%20witness%20erasure%20%2383737/near/236402940" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737.html#236402940">(Apr 27 2021 at 20:30)</a>:</h4>
<p>it's just slower :)</p>



<a name="236402951"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/generator%20witness%20erasure%20%2383737/near/236402951" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737.html#236402951">(Apr 27 2021 at 20:30)</a>:</h4>
<p>Yeah :/</p>



<a name="236403466"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/generator%20witness%20erasure%20%2383737/near/236403466" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737.html#236403466">(Apr 27 2021 at 20:34)</a>:</h4>
<p>so</p>



<a name="236403478"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/generator%20witness%20erasure%20%2383737/near/236403478" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737.html#236403478">(Apr 27 2021 at 20:34)</a>:</h4>
<p>since this is taking way longer than I hoped</p>



<a name="236403811"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/generator%20witness%20erasure%20%2383737/near/236403811" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737.html#236403811">(Apr 27 2021 at 20:37)</a>:</h4>
<p>Are you stuck on something? Like, is there something I can help with?</p>



<a name="236403839"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/generator%20witness%20erasure%20%2383737/near/236403839" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737.html#236403839">(Apr 27 2021 at 20:37)</a>:</h4>
<p>sorry, I got distracted b4ecause my build finished</p>



<a name="236403844"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/generator%20witness%20erasure%20%2383737/near/236403844" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737.html#236403844">(Apr 27 2021 at 20:37)</a>:</h4>
<p>I'm reading print outs</p>



<a name="236404513"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/generator%20witness%20erasure%20%2383737/near/236404513" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737.html#236404513">(Apr 27 2021 at 20:42)</a>:</h4>
<p>so</p>



<a name="236404534"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/generator%20witness%20erasure%20%2383737/near/236404534" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737.html#236404534">(Apr 27 2021 at 20:42)</a>:</h4>
<p>I'm adding some more printouts, which takes too dang long right now</p>



<a name="236404555"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/generator%20witness%20erasure%20%2383737/near/236404555" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737.html#236404555">(Apr 27 2021 at 20:42)</a>:</h4>
<p>but ok I sort of see the "canonicalization problem"</p>



<a name="236404565"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/generator%20witness%20erasure%20%2383737/near/236404565" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737.html#236404565">(Apr 27 2021 at 20:42)</a>:</h4>
<p>I'm not 100% sure what type the witness has etc but where is that type set?</p>



<a name="236404568"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/generator%20witness%20erasure%20%2383737/near/236404568" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737.html#236404568">(Apr 27 2021 at 20:42)</a>:</h4>
<p>in typeck somewhere</p>



<a name="236404598"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/generator%20witness%20erasure%20%2383737/near/236404598" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737.html#236404598">(Apr 27 2021 at 20:43)</a>:</h4>
<p>One sec</p>



<a name="236404648"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/generator%20witness%20erasure%20%2383737/near/236404648" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737.html#236404648">(Apr 27 2021 at 20:43)</a>:</h4>
<p><code>generator_interior</code></p>



<a name="236404754"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/generator%20witness%20erasure%20%2383737/near/236404754" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737.html#236404754">(Apr 27 2021 at 20:44)</a>:</h4>
<p><a href="https://github.com/rust-lang/rust/blob/83ebb00645cfa3288546b947aa557e90cc355bfa/compiler/rustc_typeck/src/check/generator_interior.rs#L177">here</a></p>



<a name="236405116"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/generator%20witness%20erasure%20%2383737/near/236405116" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737.html#236405116">(Apr 27 2021 at 20:46)</a>:</h4>
<p>For this case, the witness has the type <code>Box&lt;dyn Future&lt;Output = ()&gt; + Unpin&gt;</code> but the "local declaration" in <code>Body</code> is <code>Box&lt;dyn for&lt;'a&gt; Future&lt;Output = ()&gt; + Unpin&gt;</code></p>



<a name="236405289"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/generator%20witness%20erasure%20%2383737/near/236405289" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737.html#236405289">(Apr 27 2021 at 20:47)</a>:</h4>
<p>yeah</p>



<a name="236405291"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/generator%20witness%20erasure%20%2383737/near/236405291" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737.html#236405291">(Apr 27 2021 at 20:47)</a>:</h4>
<p>Really, that local declaration has already gone through an <code>erase_late_bound_regions</code> and <code>erase_regions</code> <em>probably</em>. But really should go through the same recursive erasing that gets done for adding types into the witness. <em>But I can't find where it gets added</em></p>



<a name="236405344"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/generator%20witness%20erasure%20%2383737/near/236405344" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737.html#236405344">(Apr 27 2021 at 20:48)</a>:</h4>
<p>yeah</p>



<a name="236405381"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/generator%20witness%20erasure%20%2383737/near/236405381" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737.html#236405381">(Apr 27 2021 at 20:48)</a>:</h4>
<p>ugh I hate how this issue has taken me like 50 minutes to get to the point whereI can debug it :)</p>



<a name="236405466"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/generator%20witness%20erasure%20%2383737/near/236405466" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737.html#236405466">(Apr 27 2021 at 20:49)</a>:</h4>
<p>Blame the slow builds</p>



<a name="236405484"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/generator%20witness%20erasure%20%2383737/near/236405484" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737.html#236405484">(Apr 27 2021 at 20:49)</a>:</h4>
<p>I do</p>



<a name="236405561"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/generator%20witness%20erasure%20%2383737/near/236405561" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737.html#236405561">(Apr 27 2021 at 20:49)</a>:</h4>
<p>And on top, even if you only add a <code>dbg</code> statement, that will take a few minutes to build</p>



<a name="236409338"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/generator%20witness%20erasure%20%2383737/near/236409338" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737.html#236409338">(Apr 27 2021 at 21:07)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> thoughts?</p>



<a name="236421020"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/generator%20witness%20erasure%20%2383737/near/236421020" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737.html#236421020">(Apr 27 2021 at 22:39)</a>:</h4>
<p><span class="user-mention" data-user-id="232957">@Jack Huey</span> not really, I got pulled away for other meetings, I will poke a bit more now, and I should I think have time tomorrow morning</p>



<a name="236422577"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/generator%20witness%20erasure%20%2383737/near/236422577" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737.html#236422577">(Apr 27 2021 at 22:53)</a>:</h4>
<p>Okay <span class="user-mention" data-user-id="116009">@nikomatsakis</span> I'm around for a bit if you have questions</p>



<a name="236424918"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/generator%20witness%20erasure%20%2383737/near/236424918" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737.html#236424918">(Apr 27 2021 at 23:14)</a>:</h4>
<p>not a lot of debug printouts there, are there</p>



<a name="236425364"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/generator%20witness%20erasure%20%2383737/near/236425364" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737.html#236425364">(Apr 27 2021 at 23:19)</a>:</h4>
<p>so.... <span class="user-mention" data-user-id="232957">@Jack Huey</span> ...</p>



<a name="236425402"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/generator%20witness%20erasure%20%2383737/near/236425402" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737.html#236425402">(Apr 27 2021 at 23:19)</a>:</h4>
<p>this is the "recursive erasing" you are referring to, I think</p>



<a name="236425404"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/generator%20witness%20erasure%20%2383737/near/236425404" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737.html#236425404">(Apr 27 2021 at 23:19)</a>:</h4>
<p><a href="https://github.com/rust-lang/rust/blob/83ebb00645cfa3288546b947aa557e90cc355bfa/compiler/rustc_typeck/src/check/generator_interior.rs#L188-L196">https://github.com/rust-lang/rust/blob/83ebb00645cfa3288546b947aa557e90cc355bfa/compiler/rustc_typeck/src/check/generator_interior.rs#L188-L196</a></p>



<a name="236425434"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/generator%20witness%20erasure%20%2383737/near/236425434" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737.html#236425434">(Apr 27 2021 at 23:19)</a>:</h4>
<p>that's some pretty aggressive erasure</p>



<a name="236425443"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/generator%20witness%20erasure%20%2383737/near/236425443" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737.html#236425443">(Apr 27 2021 at 23:19)</a>:</h4>
<p>I'm a bit surprised I accepted that code :)</p>



<a name="236425990"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/generator%20witness%20erasure%20%2383737/near/236425990" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737.html#236425990">(Apr 27 2021 at 23:24)</a>:</h4>
<p>Whoops lol</p>



<a name="236426032"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/generator%20witness%20erasure%20%2383737/near/236426032" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737.html#236426032">(Apr 27 2021 at 23:25)</a>:</h4>
<p>"aggresive erasure" - new catchphrase</p>



<a name="236428502"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/generator%20witness%20erasure%20%2383737/near/236428502" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737.html#236428502">(Apr 27 2021 at 23:51)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> still around?</p>



<a name="236428614"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/generator%20witness%20erasure%20%2383737/near/236428614" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737.html#236428614">(Apr 27 2021 at 23:52)</a>:</h4>
<p>That code, I think, doesn't matter <em>too</em> much in the grand scheme of things</p>



<a name="236428661"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/generator%20witness%20erasure%20%2383737/near/236428661" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737.html#236428661">(Apr 27 2021 at 23:53)</a>:</h4>
<p>The recursive bit I was talking about, I think, is the <code>RegionEraserVisitor</code></p>



<a name="236428688"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/generator%20witness%20erasure%20%2383737/near/236428688" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737.html#236428688">(Apr 27 2021 at 23:53)</a>:</h4>
<p>Specifically, found every <code>Binder&lt;T&gt;</code> it will anonymize the values and remove unused bound vars</p>



<a name="236428790"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/generator%20witness%20erasure%20%2383737/near/236428790" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737.html#236428790">(Apr 27 2021 at 23:54)</a>:</h4>
<p>But it's kind of important, because if a type has already had <code>erase_late_bound_regions</code> on it, that does <em>not</em> remove unused bound vars</p>



<a name="236428832"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/generator%20witness%20erasure%20%2383737/near/236428832" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737.html#236428832">(Apr 27 2021 at 23:55)</a>:</h4>
<p><em>But</em>, because there aren't and late-bound regions in it, if <code>erase_regions</code> is later call, the type won't be recursed into, and the unused bound vars won't be removed</p>



<a name="236433514"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/generator%20witness%20erasure%20%2383737/near/236433514" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737.html#236433514">(Apr 28 2021 at 00:53)</a>:</h4>
<p>well, adding that call to fold in the assertion didn't change anything, for sure</p>



<a name="236433556"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/generator%20witness%20erasure%20%2383737/near/236433556" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737.html#236433556">(Apr 28 2021 at 00:54)</a>:</h4>
<p>does <code>fold_regions</code> not visit bound regions?</p>



<a name="236506029"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/generator%20witness%20erasure%20%2383737/near/236506029" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737.html#236506029">(Apr 28 2021 at 13:26)</a>:</h4>
<p>ok, <span class="user-mention" data-user-id="232957">@Jack Huey</span>, spawned this otu</p>



<a name="236506039"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/generator%20witness%20erasure%20%2383737/near/236506039" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737.html#236506039">(Apr 28 2021 at 13:26)</a>:</h4>
<p>I'm only 50% here</p>



<a name="236506046"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/generator%20witness%20erasure%20%2383737/near/236506046" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737.html#236506046">(Apr 28 2021 at 13:26)</a>:</h4>
<p>but I'm going to poke a bit more</p>



<a name="236506564"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/generator%20witness%20erasure%20%2383737/near/236506564" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737.html#236506564">(Apr 28 2021 at 13:29)</a>:</h4>
<p>So, don't know if you read any of the other stream</p>



<a name="236506595"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/generator%20witness%20erasure%20%2383737/near/236506595" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737.html#236506595">(Apr 28 2021 at 13:29)</a>:</h4>
<p>But what do you think of this fix: <a href="https://github.com/jackh726/rust/tree/always-erase">https://github.com/jackh726/rust/tree/always-erase</a></p>



<a name="236508862"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/generator%20witness%20erasure%20%2383737/near/236508862" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737.html#236508862">(Apr 28 2021 at 13:44)</a>:</h4>
<p>I didn't catch up on that one yet</p>



<a name="236508907"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/generator%20witness%20erasure%20%2383737/near/236508907" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737.html#236508907">(Apr 28 2021 at 13:44)</a>:</h4>
<p>Almost nothing is relevant except that I realized that fix</p>



<a name="236508928"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/generator%20witness%20erasure%20%2383737/near/236508928" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737.html#236508928">(Apr 28 2021 at 13:45)</a>:</h4>
<p>I am weirded out by that fix</p>



<a name="236508953"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/generator%20witness%20erasure%20%2383737/near/236508953" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737.html#236508953">(Apr 28 2021 at 13:45)</a>:</h4>
<p>it suggests that this is not just an optiimization :)</p>



<a name="236508971"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/generator%20witness%20erasure%20%2383737/near/236508971" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737.html#236508971">(Apr 28 2021 at 13:45)</a>:</h4>
<p>Well</p>



<a name="236509005"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/generator%20witness%20erasure%20%2383737/near/236509005" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737.html#236509005">(Apr 28 2021 at 13:45)</a>:</h4>
<p>I think the fix is correct</p>



<a name="236509010"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/generator%20witness%20erasure%20%2383737/near/236509010" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737.html#236509010">(Apr 28 2021 at 13:45)</a>:</h4>
<p>I see the problem</p>



<a name="236509025"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/generator%20witness%20erasure%20%2383737/near/236509025" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737.html#236509025">(Apr 28 2021 at 13:45)</a>:</h4>
<p>basically those flags indicated the <em>use</em> of regions</p>



<a name="236509030"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/generator%20witness%20erasure%20%2383737/near/236509030" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737.html#236509030">(Apr 28 2021 at 13:45)</a>:</h4>
<p>Importantly, now we can have bound vars without having the bound regions in the type</p>



<a name="236509037"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/generator%20witness%20erasure%20%2383737/near/236509037" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737.html#236509037">(Apr 28 2021 at 13:45)</a>:</h4>
<p>yes, exactly</p>



<a name="236509038"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/generator%20witness%20erasure%20%2383737/near/236509038" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737.html#236509038">(Apr 28 2021 at 13:45)</a>:</h4>
<p>but non-empty binders also count?</p>



<a name="236509047"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/generator%20witness%20erasure%20%2383737/near/236509047" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737.html#236509047">(Apr 28 2021 at 13:45)</a>:</h4>
<p>that should be another flag perhaps</p>



<a name="236509068"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/generator%20witness%20erasure%20%2383737/near/236509068" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737.html#236509068">(Apr 28 2021 at 13:45)</a>:</h4>
<p>Hehe that is one thing I said</p>



<a name="236509079"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/generator%20witness%20erasure%20%2383737/near/236509079" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737.html#236509079">(Apr 28 2021 at 13:46)</a>:</h4>
<p>or just any non-empty binder could set <code>HAS_RE_LATE_BOUND</code></p>



<a name="236509145"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/generator%20witness%20erasure%20%2383737/near/236509145" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737.html#236509145">(Apr 28 2021 at 13:46)</a>:</h4>
<p>Probably easier</p>



<a name="236509232"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/generator%20witness%20erasure%20%2383737/near/236509232" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737.html#236509232">(Apr 28 2021 at 13:46)</a>:</h4>
<p>I wonder if that'll mess with some normalizations that require <code>!data.has_escaping_bound_vars()</code></p>



<a name="236509253"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/generator%20witness%20erasure%20%2383737/near/236509253" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737.html#236509253">(Apr 28 2021 at 13:47)</a>:</h4>
<p>I guess that uses the <code>innermost</code></p>



<a name="236509457"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/generator%20witness%20erasure%20%2383737/near/236509457" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737.html#236509457">(Apr 28 2021 at 13:48)</a>:</h4>
<p>that seems distinct</p>



<a name="236509498"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/generator%20witness%20erasure%20%2383737/near/236509498" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737.html#236509498">(Apr 28 2021 at 13:48)</a>:</h4>
<p>Okay, so this fixes everything so far</p>



<a name="236509535"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/generator%20witness%20erasure%20%2383737/near/236509535" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737.html#236509535">(Apr 28 2021 at 13:48)</a>:</h4>
<p>including the new issue</p>



<a name="236509537"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/generator%20witness%20erasure%20%2383737/near/236509537" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737.html#236509537">(Apr 28 2021 at 13:48)</a>:</h4>
<p>I think we should set the <code>HAS_RE_LATE_BOUND</code> flag on anything with non-empty binders</p>



<a name="236509584"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/generator%20witness%20erasure%20%2383737/near/236509584" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737.html#236509584">(Apr 28 2021 at 13:48)</a>:</h4>
<p>I really hate how type flags don't have precise semantic meanings</p>



<a name="236509585"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/generator%20witness%20erasure%20%2383737/near/236509585" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737.html#236509585">(Apr 28 2021 at 13:48)</a>:</h4>
<p>Yes, I will do that. That's a <em>better</em> fix</p>



<a name="236509600"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/generator%20witness%20erasure%20%2383737/near/236509600" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737.html#236509600">(Apr 28 2021 at 13:48)</a>:</h4>
<p>it's always hard to tell when it's appropriate to set them and if it'll break some code</p>



<a name="236509634"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/generator%20witness%20erasure%20%2383737/near/236509634" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737.html#236509634">(Apr 28 2021 at 13:49)</a>:</h4>
<p>but how i read that flag is "a late-bound variable appears in this type somewhere'</p>



<a name="236509644"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/generator%20witness%20erasure%20%2383737/near/236509644" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737.html#236509644">(Apr 28 2021 at 13:49)</a>:</h4>
<p>in particular <em>not</em> 'appears free'</p>



<a name="236509652"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/generator%20witness%20erasure%20%2383737/near/236509652" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737.html#236509652">(Apr 28 2021 at 13:49)</a>:</h4>
<p>just 'appears'</p>



<a name="236509673"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/generator%20witness%20erasure%20%2383737/near/236509673" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737.html#236509673">(Apr 28 2021 at 13:49)</a>:</h4>
<p>(in contrast to "escaping", which means "appears free')</p>



<a name="236509693"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/generator%20witness%20erasure%20%2383737/near/236509693" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737.html#236509693">(Apr 28 2021 at 13:49)</a>:</h4>
<p>I don't think for that flag it matters</p>



<a name="236509739"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/generator%20witness%20erasure%20%2383737/near/236509739" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737.html#236509739">(Apr 28 2021 at 13:49)</a>:</h4>
<p>The problem is not so much in the semantics, but in how they get uses</p>



<a name="236509883"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/generator%20witness%20erasure%20%2383737/near/236509883" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737.html#236509883">(Apr 28 2021 at 13:50)</a>:</h4>
<p>I'm <em>hoping</em> that this only gets used for optimizations and not correctness</p>



<a name="236510581"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/generator%20witness%20erasure%20%2383737/near/236510581" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737.html#236510581">(Apr 28 2021 at 13:55)</a>:</h4>
<p>Ugh so...</p>



<a name="236510631"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/generator%20witness%20erasure%20%2383737/near/236510631" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737.html#236510631">(Apr 28 2021 at 13:56)</a>:</h4>
<p>There's <code>HAS_RE_LATE_BOUND</code></p>



<a name="236510691"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/generator%20witness%20erasure%20%2383737/near/236510691" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737.html#236510691">(Apr 28 2021 at 13:56)</a>:</h4>
<p>But not the equivalent for types or consts</p>



<a name="236511858"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/generator%20witness%20erasure%20%2383737/near/236511858" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737.html#236511858">(Apr 28 2021 at 14:02)</a>:</h4>
<p><span class="user-mention" data-user-id="232957">@Jack Huey</span> I think we should generate that flag</p>



<a name="236512110"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/generator%20witness%20erasure%20%2383737/near/236512110" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737.html#236512110">(Apr 28 2021 at 14:04)</a>:</h4>
<p><code>HAS_RE_LATE_BOUND</code>?</p>



<a name="236512137"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/generator%20witness%20erasure%20%2383737/near/236512137" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737.html#236512137">(Apr 28 2021 at 14:04)</a>:</h4>
<p>That's what I'm trying; building</p>



<a name="236512733"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/generator%20witness%20erasure%20%2383737/near/236512733" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737.html#236512733">(Apr 28 2021 at 14:08)</a>:</h4>
<p>Yes that works</p>



<a name="236512955"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/generator%20witness%20erasure%20%2383737/near/236512955" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737.html#236512955">(Apr 28 2021 at 14:09)</a>:</h4>
<p><span class="user-mention silent" data-user-id="232957">Jack Huey</span> <a href="#narrow/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737/near/236512110">said</a>:</p>
<blockquote>
<p><code>HAS_RE_LATE_BOUND</code>?</p>
</blockquote>
<p>right</p>



<a name="236512978"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/generator%20witness%20erasure%20%2383737/near/236512978" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737.html#236512978">(Apr 28 2021 at 14:09)</a>:</h4>
<p>sorry, I meant to write <em>generalize</em></p>



<a name="236512988"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/generator%20witness%20erasure%20%2383737/near/236512988" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737.html#236512988">(Apr 28 2021 at 14:09)</a>:</h4>
<p>I'm not sure where it's used though</p>



<a name="236513290"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/generator%20witness%20erasure%20%2383737/near/236513290" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737.html#236513290">(Apr 28 2021 at 14:10)</a>:</h4>
<p><code>fn has_late_bound_regions</code> is used in 3 places</p>



<a name="236513347"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/generator%20witness%20erasure%20%2383737/near/236513347" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737.html#236513347">(Apr 28 2021 at 14:11)</a>:</h4>
<p>One in <code>v0</code> mangling, when decided whether late bound regions need to be collected. (Optimization)</p>



<a name="236513441"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/generator%20witness%20erasure%20%2383737/near/236513441" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737.html#236513441">(Apr 28 2021 at 14:12)</a>:</h4>
<p>Another in <code>candidate_should_be_dropped_in_favor_of</code>, when setting <code>is_global</code></p>



<a name="236513493"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/generator%20witness%20erasure%20%2383737/near/236513493" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737.html#236513493">(Apr 28 2021 at 14:12)</a>:</h4>
<p>The is <em>potentially</em> a correctness thing</p>



<a name="236513743"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/generator%20witness%20erasure%20%2383737/near/236513743" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737.html#236513743">(Apr 28 2021 at 14:13)</a>:</h4>
<p>And the last in <code>wfcheck</code> <code>check_false_global_bounds</code>, which seems to be used to decide whether a predicate is "global" for trivial bounds, I think</p>



<a name="236514075"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/generator%20witness%20erasure%20%2383737/near/236514075" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737.html#236514075">(Apr 28 2021 at 14:15)</a>:</h4>
<p>This says to me that in something like <code>fn foo() where for&lt;'a&gt; u32: Sized {}</code> <code>for&lt;'a&gt; u32: Sized </code> would no longer be "trivial"</p>



<a name="236514876"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/generator%20witness%20erasure%20%2383737/near/236514876" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/generator.20witness.20erasure.20.2383737.html#236514876">(Apr 28 2021 at 14:20)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> <a href="https://github.com/rust-lang/rust/pull/84653">https://github.com/rust-lang/rust/pull/84653</a></p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>